1. Field of the Invention
This invention relates to data communications and, more particularly, is directed to a highly efficient coding apparatus for compressing the number of bits of data required for each picture element of a digital television signal or the like.
2Description of the Prior Art
Among known methods of video signal coding, there are some highly efficient coding methods adapted to diminish the average bit number or sampling frequency of each picture element for purposes of narrowing the transmission band.
Applicants' Japanese Laid Open Patent Publication No. 61-144,989 discloses a highly efficient coding apparatus for determining a dynamic range from maximum and minimum values of a plurality of picture elements contained in a two-dimensional block and for performing a coding adapted to the dynamic range thus obtained. Further, Japanese Laid Open Patent Publication No. 62-92620 discloses a highly efficient coding apparatus for effecting coding adapted to a dynamic range determined with respect to a three-dimensional block formed of picture elements contained in areas of a plurality of frames. Moreover, Japanese Laid Open Patent Publication No. 62-128621 discloses a variable-length coding method for varying the quantization bit number as a function of the dynamic range so as to keep constant the maximum distortion occurring at the time of quantization.
Reference will be made to FIG. 1 in explaining a known adaptive dynamic range coding (ADRC) method. The dynamic range DR (difference between a maximum value MAX and a minimum value MIN) is calculated for every two-dimensional block formed of, for example, (8 lines .times.8 pixels =64 pixels). The minimum level (minimum value) is removed from the input pixel data in the block. After removal of the minimum value, each picture element (pixel) is converted into a representative level. This quantization is for dividing the detected dynamic range DR into four level ranges A0 to A3 corresponding to a number of bits less than the bit number that would be required for an original quantization of the pixel data. Upon transmission, each pixel in the block is represented by a code signal indicative of the respective level range.
In FIG. 1, the dynamic range DR of the block is divided into four level ranges A0 to A3. Pixel data contained in the minimum level range A0 are coded as (00), pixel data contained in the level range A1 are coded as (01), pixel data contained in the level range A2 are coded as (10), and pixel data contained in the maximum level range A3 are coded as (11). Therefore, picture element data of 8 bits are compressed into 2 bits for efficient transmission.
In a receiver, such a received code signal is decoded into one of a plurality of representative levels L0 to L3 which are center levels of the level ranges A0 to A3, respectively.
The above described adaptive dynamic range coding method is disadvantageous in that a block distortion occurs because of a ringing or an impulsive noise as will be described with reference to FIG. 2. In FIG. 2, for the purpose of simplifying the explanation, variation in data in respect of a one-dimensional block, i.e., a block formed of a predetermined number of samples in a horizontal line or direction, is shown as an analog waveform, and values decoded by the receiver are shown by a broken line.
A low-level ringing is often produced in a picture output of a video camera near an edge where the level is changed abruptly, as shown in FIG. 2. In the block including such ringing, a peak value of the ringing is detected as a maximum value MAX1, and coding is carried out adaptively with reference to a dynamic range DR1 between the maximum value MAX1, and a minimum value MIN1. In a subsequent block, in which the ringing is converged, the maximum value is decreased to MAX2, and coding is effected adaptively with reference to a dynamic range DR2 between a minimum value MIN2 and the maximum value MAX2. Therefore, a difference in luminance level is indicated between these two blocks and this causes a block distortion. Also in the case of an impulsive noise, a block distortion occurs for the same reason. The difference in luminance level causing the block distortion is small but nevertheless is visually noticeable.
In order to overcome the problem of block distortion caused by a ringing or an impulsive noise, the present applicants have proposed a system for performing preliminary processing of input data converted into a block structure for example, as described in the Japanese Laid Open Patent Publication No. 63-59187. More specifically, an average value MAX' of the values of input data contained in a maximum level range (A3 in FIG. 1) and an average value MIN' of the input data contained in a minimum level range (A0 in FIG. 1) are detected, and then quantization is carried out so as to convert the average value MAX' and the minimum value MIN' into detected levels L3 and L0, respectively, as shown in FIG. 3. The quantization shown in FIG. 1 in which the representative levels L0 to L3 do not include the maximum value MAX and the minimum value MIN but indicate center values in respective level ranges, is called a non-edge matching. In contrast, the quantization shown in FIG. 3 in which the levels L0 to L3 do include the average values MAX' and MIN', is called an edge matching.
In the ADRC method which involves first performing the preliminary non-edge matching processing and then subsequently performing the edge matching quantization, the maximum value is converted into the average value MAX' and not into the ringing peak in a block including the ringing shown in FIG. 2. Similarly, the minimum value is converted into MIN'. Since the edge matching quantization is carried out in respect to the concealed dynamic range DR' determined by the values MAX' and MIN', the difference between the decoded level of a specific block including a ringing and a decoded level of an adjacent block is reduced, and generation of block distortion is prevented.
Since the above-described adaptive to a dynamic range coding (ADRC) method can largely compress the amount of data to be transmitted, it is suitable for use in a digital VTR. Although variable-length ADRC can increase the compression rate, variable-length ADRC causes variation in the amount of transmitted data with the contents of the picture, so that a buffering process is required when using a transmission path having a fixed rate, such as, a digital VTR configured to record a predetermined amount of data in each track.
A buffering system for variable-length ADRC has been proposed by the present applicants, for example, as disclosed in Japanese Laid Open Patent Publication No. 63-111781. In this system, an integrating type frequency distribution table of dynamic ranges is formed and a threshold value is preliminarily obtained from the frequency distribution table for determining an assigned bit number, whereupon the generated amount of information in a predetermined period, such as one frame period, is obtained, so that the generated information amount does not surpass a target value.
When using variable-length ADRC in the above-mentioned ADRC method which involves preliminary processing using the non-edge matching quantization and subsequent performing of the edge matching quantization, a problem arises by reason of mismatching between the encoder and the decoder because, while the assigned bit number is established based on an original dynamic range DR, a different dynamic range DR' is transmitted to the receiver side.
More specifically, in order to control the generated information amount, a frequency distribution table for a predetermined period, e.g., one frame period, of dynamic ranges DR is prepared, and the frequency distribution table is converted into an integrating type frequency distribution table to which threshold values T1, T2, T3 and T4 (T1&lt;T2&lt;T3&lt;T4) are adapted. In case of (DR&lt;T1), the assigned bit number n is set at 0 (this means that no code signal is transmitted). In case of (T1.ltoreq.DR&lt;T2), the assigned bit number is set at (n=1). In case of (T2.ltoreq.DR&lt;T3), the assigned bit number is set at (n=2). In case of (T3&lt;=DR&lt;T4), the assigned bit number is set at (n=3). In case of (T4=&lt;DR), the assigned bit number is set at (n=4).
As described above, for the relationship of (MAX' MIN'-MIN'=DR'), quantization is performed in respect to the concealed dynamic range DR', and the dynamic range DR' is transmitted. If the relationships of (T2&lt;DR&lt;T3) and (T2 DR'&lt;T3) are established for the dynamic range of a certain block, the bit number (n=2) set at the encoder also exhibits (n=2) at the decoder, and no problem occurs. However, since the relationship of (DR&gt;DR') exists, the decoder may erroneously regard the bit number as being (n=1) in the case of T1.ltoreq.DR'&lt;T2), and this causes a problem in that proper decoding is not effected.